#!/bin/sh

i="0"
while [ -e /dev/parport$i ]
do
i=`expr $i + 1`
done

echo $i

